package com.example.administrator.myapplication;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

/**
 * Created by Administrator on 2016/4/1 0001.
 */
public class MyReceiver1 extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String msg = intent.getStringExtra("msg");
        System.out.println("MyReceiver1接收到广播:" + msg);
        //优先级高提供额外数据
        setResultData("setResultData from receiver1");
        Bundle bundle = new Bundle();
        bundle.putString("msg1","bundle form receiver1");
        setResultExtras(bundle);
    }
}
